package com.erlang4j.internal.adapters;

import com.erlang4j.api.IGetData;
import com.erlang4j.api.process.IProcessWithState;


public class MockAdapterWithStateChangeAdapter extends MockAdapter {

	private final String newStateName;

	public MockAdapterWithStateChangeAdapter(String pattern, String newStateName) {
		super(pattern);
		this.newStateName = newStateName;
	}

	@Override
	public void process(IProcessWithState process, IGetData data) throws Exception {
		super.process(process, data);
		process.changeState(newStateName);
	}
}